<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <form>
        用户名：<input type="text" class="username"><p class="p1"></p><br>
        密码：<input type="password" class="password"><br>
        <input type="button" class="login" value="login">
    </form>
</body>
</html>
<script src="jquery.js">

</script>
<script>
    $(".login").click(function () {
        $.ajax({
            url:"/con/consumers/login",
            data:{uname:$(".username").val(),upassword:$(".password").val()},
            type:"get",
            success:function (data) {
                $(".p1").html(data);
            }
        })
    })
</script>